package com.ltu.service.impl.customize;

import com.alibaba.fastjson.JSONArray;
import com.ltu.config.GlobalJsonCfg;
import com.ltu.domain.mp_entity.customize.SolicitorsEntity;
import com.ltu.mapper.customize.SolicitorsMapper;
import com.ltu.myannotation.MyReidsCache;
import com.ltu.service.customize.SolicitorsService;

import java.util.concurrent.TimeUnit;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ltu.service.impl.BaseServiceImpl;
import com.ltu.util.redis.RedisKeyManager;

import lombok.AllArgsConstructor;

/**
 * <p>
 * 律师表 服务实现类
 * </p>
 *
 * @author 若尘
 * @since 2024-09-26
 */
@Service
@AllArgsConstructor(onConstructor = @__({@Autowired}))
public class SolicitorsServiceImpl extends BaseServiceImpl<SolicitorsMapper, SolicitorsEntity> implements SolicitorsService {
	private final GlobalJsonCfg clobalJsonCfg;

	@Override
	@MyReidsCache(enable = true, timeUnit = TimeUnit.SECONDS, expireTime = 3600*12, key = RedisKeyManager.RootKey+(RedisKeyManager.Splitter)+"SolicitorsType")
	public JSONArray getSolicitorsType() {
		return clobalJsonCfg.getGlobalContans().getJSONArray("solicitorsType");
	}
	
	@Override
	@MyReidsCache(enable = true, timeUnit = TimeUnit.SECONDS, expireTime = 3600*12, key = RedisKeyManager.RootKey+(RedisKeyManager.Splitter)+"ServerType")
	public JSONArray getServerType() {
		return clobalJsonCfg.getGlobalContans().getJSONArray("serverType");
	}
}
